package com.gitee.wsl.transform.encode


fun interface StringEncode<V>:Encode<String,V>{
    companion object
}

fun interface DecodeToString<V>:Decode<V,String>{
    companion object

}

interface StringEncodeDecode<V>: StringEncode<V>,DecodeToString<V>

interface StringToStringEncodeDecode: StringEncodeDecode<String>

interface StringToByteArrayEncodeDecode: StringEncodeDecode<ByteArray>

fun <V> String.encode(type: StringEncode<V>) = type.encode(this)

fun <V> V.decode(type: DecodeToString<V>) = type.decode(this)
